<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    *{
      box-sizing: border-box;
      padding: 0;
      margin: 0;
    }
    .box1{
      width: 200px;
      height: 200px;
      background-color: red;
      position: relative;
      left: 50px;
      top: 100px;
    }
    .span2{
      position: relative;
      top: 30px;
      right: 70px;
    }
    .box2{
      height: 500px;
      background-color: royalblue;
      padding: 50px;
      margin: 50px;
      position: relative;
    }
    .box3{
      height:100px ;
      background-color: seagreen;
      /* position: relative; */
    }
    .box4{
      width: 100px;
      height: 100px;
      background-color: red;
      position: absolute;
      /* position: sticky; */
      left: 20px;
      top: 20px;
    }
    .box5{
      width: 30px;
      height: 30px;
      background-color: salmon;
      position: fixed;
      left: 10px;
      top: 10px;
    }
  </style>
</head>
<body>
  <!-- <div class="box1">
    <span>111</span>
    <span class="span2">222</span>
    <span>333</span>
  </div> -->
  <div class="box2">
    <div class="box3">
      <div class="box4"><div class="box5"></div></div>
    </div>
  </div>
</body>
</html>